<ul class="sidebar-menu" data-widget="tree">
    <li class="{{ activeRouteStrict('index') }}">
        <a href="{{ route('index') }}">
            <em class="fa fa-dashboard fa-fw"></em>
            <span>{{ 'dashboard'|_ }}</span>
        </a>
    </li>

    <li class="header text-uppercase">{{ 'financial_control'|_ }}</li>

    <li class="{{ activeRoutePartial('budgets') }}" id="budget-menu">
        <a href="{{ route('budgets.index') }}">
            <em class="fa fa-pie-chart fa-fw"></em>
            <span>{{ 'budgets'|_ }}</span>
        </a>
    </li>

    <li class="{{ activeRoutePartial('bills') }}">
        <a href="{{ route('bills.index') }}">
            <em class="fa fa-calendar-o fa-fw"></em>
            <span>{{ 'bills'|_ }}</span>
        </a>
    </li>

    <li class="{{ activeRoutePartial('piggy-banks') }}">
        <a href="{{ route('piggy-banks.index') }}">
            <em class="fa fa-bullseye fa-fw"></em>
            <span>{{ 'piggyBanks'|_ }}</span>
        </a>
    </li>

    <li class="header text-uppercase">{{ 'accounting'|_ }}</li>

    <li class="{{ activeRoutePartial('transactions') }} treeview" id="transaction-menu">
        <a href="#">
            <em class="fa fa-exchange fa-fw"></em>
            <span>{{ 'transactions'|_ }}</span>
            <span class="pull-right-container">
        <span class="fa fa-angle-left pull-right"></span>
      </span>
        </a>

        <ul class="treeview-menu">
            <li class="{{ activeRoutePartialObjectType('transactions', 'withdrawal') }}">
                <a href="{{ route('transactions.index', ['withdrawal']) }}">
                    <span class="fa fa-angle-right fa-fw"></span>
                    <span>{{ 'expenses'|_ }}</span>
                </a>
            </li>
            <li class="{{ activeRoutePartialObjectType('transactions', 'deposit') }}">
                <a href="{{ route('transactions.index', ['deposit']) }}">
                    <span class="fa fa-angle-right fa-fw"></span>
                    <span>{{ 'income'|_ }}</span>
                </a>
            </li>
            <li class="{{ activeRoutePartialObjectType('transactions', 'transfers') }}">
                <a href="{{ route('transactions.index', ['transfers']) }}">
                    <span class="fa fa-angle-right fa-fw"></span>
                    <span>{{ 'transfers'|_ }}</span>
                </a>
            </li>
        </ul>
    </li>

    <li class="{{ activeRoutePartial('recurring') }} {{ activeRoutePartial('rules') }} treeview">
        <a href="#">
            <em class="fa fa-microchip fa-fw"></em>
            <span>{{ 'automation'|_ }}</span>
            <span class="pull-right-container">
        <span class="fa fa-angle-left pull-right"></span>
      </span>
        </a>

        <ul class="treeview-menu">
            <li class="{{ activeRoutePartial('rules') }}">
                <a href="{{ route('rules.index') }}">
                    <span class="fa fa-angle-right fa-fw"></span>
                    <span>{{ 'rules'|_ }}</span>
                </a>
            </li>
            <li class="{{ activeRoutePartial('recurring') }}">
                <a href="{{ route('recurring.index') }}">
                    <span class="fa fa-angle-right fa-fw"></span>
                    <span>{{ 'recurrences'|_ }}</span>
                </a>
            </li>
            {% if true == featuringWebhooks %}
            <li class="{{ activeRoutePartial('webhooks') }}">
                <a href="{{ route('webhooks.index') }}">
                    <span class="fa fa-angle-right fa-fw"></span>
                    <span>{{ 'webhooks'|_ }}</span>
                </a>
            </li>
            {% else %}
                <li class="">
                    <a href="#">
                        <span class="fa fa-angle-right fa-fw"></span>
                        <span>{{ 'webhooks'|_ }} ({{ 'webhooks_menu_disabled'|_ }})</span>
                    </a>
                </li>
            {% endif %}
        </ul>
    </li>

    <li class="header text-uppercase">{{ 'others'|_ }}</li>

    <li class="{{ activeRoutePartial('accounts') }} treeview" id="account-menu">
        <a href="#">
            <em class="fa fa-credit-card fa-fw"></em>
            <span>{{ 'accounts'|_ }}</span>
            <span class="pull-right-container">
        <span class="fa fa-angle-left pull-right"></span>
      </span>
        </a>

        <ul class="treeview-menu">
            <li class="{{ activeRoutePartialObjectType('accounts', 'asset') }}">
                <a href="{{ route('accounts.index', ['asset']) }}">
                    <span class="fa fa-angle-right fa-fw"></span>
                    <span>{{ 'asset_accounts'|_ }}</span>
                </a>
            </li>
            <li class="{{ activeRoutePartialObjectType('accounts', 'expense') }}">
                <a href="{{ route('accounts.index', ['expense']) }}">
                    <span class="fa fa-angle-right fa-fw"></span>
                    <span>{{ 'expense_accounts'|_ }}</span>
                </a>
            </li>
            <li class="{{ activeRoutePartialObjectType('accounts', 'revenue') }}">
                <a href="{{ route('accounts.index', ['revenue']) }}">
                    <span class="fa fa-angle-right fa-fw"></span>
                    <span>{{ 'revenue_accounts'|_ }}</span>
                </a>
            </li>
            <li class="{{ activeRoutePartialObjectType('accounts', 'liabilities') }}">
                <a href="{{ route('accounts.index', ['liabilities']) }}">
                    <span class="fa fa-angle-right fa-fw"></span>
                    <span>{{ 'liabilities_accounts'|_ }}</span>
                </a>
            </li>
        </ul>
    </li>

    <li class="{{ activeRoutePartial('categories') }} {{ activeRoutePartial('tags') }} {{ activeRoutePartial('groups') }} treeview">
        <a href="#">
            <em class="fa fa-tags fa-fw"></em>
            <span>{{ 'classification'|_ }}</span>
            <span class="pull-right-container">
        <span class="fa fa-angle-left pull-right"></span>
      </span>
        </a>

        <ul class="treeview-menu">
            <li class="{{ activeRoutePartial('categories') }}">
                <a href="{{ route('categories.index') }}">
                    <span class="fa fa-angle-right fa-fw"></span>
                    <span>{{ 'categories'|_ }}</span>
                </a>
            </li>
            <li class="{{ activeRoutePartial('tags') }}">
                <a href="{{ route('tags.index') }}">
                    <span class="fa fa-angle-right fa-fw"></span>
                    <span>{{ 'tags'|_ }}</span>
                </a>
            </li>
            <li class="{{ activeRoutePartial('object-groups') }}">
                <a href="{{ route('object-groups.index') }}">
                    <span class="fa fa-angle-right fa-fw"></span>
                    <span>{{ 'object_groups_menu_bar'|_ }}</span>
                </a>
            </li>
        </ul>
    </li>

    <li class="{{ activeRoutePartial('reports') }}" id="report-menu">
        <a href="{{ route('reports.index') }}"> {# relative route! #}
            <em class="fa fa-bar-chart fa-fw"></em>
            <span>{{ 'reports'|_ }}</span>
        </a>
    </li>


    {% if config('firefly.feature_flags.export') %}
        <li class="{{ activeRoutePartial('export') }}" id="report-menu">
            <a href="{{ route('export.index') }}">
                <em class="fa fa-upload fa-fw"></em>
                <span>{{ 'export_data_menu'|_ }}</span>
            </a>
        </li>
    {% endif %}

    <li class="{{ activeRoutePartial('admin') }} {{ activeRoutePartial('profile') }} {{ activeRoutePartial('preferences') }} {{ activeRoutePartial('currencies') }} treeview"
        id="option-menu">
        <a href="#">
            <em class="fa fa-sliders fa-fw"></em>
            <span>{{ 'options'|_ }}</span>
            <span class="pull-right-container">
        <span class="fa fa-angle-left pull-right"></span>
      </span>
        </a>

        <ul class="treeview-menu">
            <li class="{{ activeRoutePartial('profile') }}">
                <a class="{{ activeRouteStrict('profile.index') }}" href="{{ route('profile.index') }}">
                    <span class="fa fa-angle-right fa-fw"></span>
                    <span>{{ 'profile'|_ }}</span>
                </a>
            </li>
            <li class="{{ activeRoutePartial('preferences') }}">
                <a class="{{ activeRouteStrict('preferences.index') }}"
                   href="{{ route('preferences.index') }}">
                    <span class="fa fa-angle-right fa-fw"></span>
                    <span>{{ 'preferences'|_ }}</span>
                </a>
            </li>
            <li class="{{ activeRoutePartial('currencies') }}">
                <a class="{{ activeRoutePartial('currencies') }}" href="{{ route('currencies.index') }}">
                    <span class="fa fa-angle-right fa-fw"></span>
                    <span>{{ 'currencies'|_ }}</span>
                </a>
            </li>
            {% if hasRole('owner') %}
                <li class="{{ activeRoutePartial('admin') }}">
                    <a class="{{ activeRoutePartial('admin') }}" href="{{ route('admin.index') }}">
                        <span class="fa fa-angle-right fa-fw"></span>
                        <span>{{ 'administration'|_ }}</span>
                    </a>
                </li>
            {% endif %}
        </ul>
    </li>


    {% if 'remote_user_guard' != authGuard or '' != logoutUri %}
        <li>
            <a href="{{ route('logout') }}" class="logout-link">
                <em class="fa fa-sign-out fa-fw"></em>
                <span>{{ 'logout'|_ }}</span>
            </a>
        </li>
    {% endif %}
</ul>
